<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<script type="text/javascript" src="<s:url value="/js/jquery.validate.min.js"/>"></script>
<script type="text/javascript" src="<s:url value="/js/importaciones.js"/>"></script>

<s:form id="formEdit" cssClass="tableEdit" >
    <tr>
        <th colspan="4" class="tableTitle">
            <h5>Discount</h5>
        </th>
    </tr>

    <s:hidden name="drogaImportacion.id" value="%{drogaImportacion.id}"/>
    <s:hidden name="drogaImportacion.importacion.id" value="%{drogaImportacion.importacion.id}"/>

    <s:hidden id="country" name="drogaImportacion.importacion.compromisopais.id" value="%{drogaImportacion.importacion.compromisopais.id}" />
    <s:textfield label="Country" disabled="true" value="%{drogaImportacion.importacion.compromisopais.country}"/>

    <s:hidden name="drogaImportacion.importacion.importPermit" value="%{drogaImportacion.importacion.importPermit}" />
    <s:textfield label="Import permit" value="%{importacion.importPermit}" disabled="true"/>

    <s:hidden name="drogaImportacion.droga.id" value="%{drogaImportacion.droga.id}" />
    <s:textfield label="Drug" value="%{drogaImportacion.droga.drugName}" disabled="true"/>

    <s:hidden name="drogaImportacion.initialQty" value="%{drogaImportacion.initialQty}" />
    <s:textfield label="Initial Quantity" value="%{drogaImportacion.initialQty}" disabled="true"/>

    <s:hidden name="drogaImportacion.currentBalance" id="balance" value="%{drogaImportacion.currentBalance}" />
    <s:textfield label="Current Balance" value="%{drogaImportacion.currentBalance}" disabled="true"/>

    <s:hidden name="drogaImportacion.unit" value="%{drogaImportacion.unit}" />
    <s:textfield label="Unit" value="%{drogaImportacion.unit}" disabled="true"/>

    <s:select label="Protocol" name="protocolToDiscountId"
              headerKey="" headerValue="Choose Protocol"
              list="protocolList"
              listKey="id"
              listValue="id"
            >
    </s:select>

    <s:textfield label="Take Off" name="takeOff"/>

    <tr>
        <td colspan="2" class="centeredButtons">
            <s:submit value="Save" id="saveDiscount" action="saveDiscount" onclick="validateDiscount();" theme="simple" />
            <s:submit value="Cancel" id="cancel" action="cancelDiscount" theme="simple" />
        </td>
    </tr>

</s:form>

<script type="text/javascript">
    actualizarProtocolos('<s:property value="%{protUrl}"/>');
</script>

<script type="text/javascript">
    $('#create').css({"color":"#EE5102","fontWeight":"bold"});
</script>